<template>
  <div class="demo-container">
    <h2>Vue Router Demo</h2>
    <button @click="back">Back</button>
    <button @click="forward">Forward</button>
    <div class="router-container">
      <div class="narbar-left">
        <ul>
          <router-link to="/router/home">
            <li>Home</li>
          </router-link>
          <router-link to="/router/about">
            <li>About</li>
          </router-link>
        </ul>
      </div>
      <div class="mini-page">
        <RouterMiniPage />
      </div>
    </div>
  </div>
</template>

<script>
import RouterMiniPage from "./RouterMiniPage.vue";
export default {
  data() {
    return {};
  },
  components: {
    RouterMiniPage,
  },
  methods: {
    back() {
      this.$router.back();
    },
    forward() {
      this.$router.forward();
    },
  },
};
</script>

<style>
.demo-container {
  background-color: rgb(209, 202, 102);
}
.router-container {
  background-color: darkkhaki;
  display: flex;
  justify-content: space-around;
}
</style>
